package com.salim.leetcode.$26;

public class RemoveDuplicates {
    public int removeDuplicates(int[] nums) {
        int inputIndex = 1;
        for(int i=1;i<nums.length;i++){
            if(nums[i]>nums[i-1]){
                nums[inputIndex] = nums[i];
                inputIndex++;
            }
        }
        return inputIndex;
    }
}
